package com.ddtech.business.course.controller;

import com.ddtech.business.course.service.CourseResourceService;
import com.ddtech.framework.log.aop.log.Log;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version v1.0
 * @ClassName:CourseGradeController description：
 * @author:wei_zhang(xiao)
 * @date: 2023-06-02 15:05
 */
@Api(tags = "PC-课程资源")
@RestController
@RequestMapping("/course-recource")
public class CourseResourceController {

    @Autowired
    private CourseResourceService courseResourceService;

    @Log("pc、app移动端查询课程播放资源")
    @ApiOperation(value = "pc、app移动端查询课程播放资源")
    @GetMapping(value = "/findOne/{id}")
    public ResponseEntity findOne(@PathVariable String id) {
        return new ResponseEntity(courseResourceService.findOne(id),HttpStatus.OK);
    }
}
